package shuzi.util;


import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class Ifconnect {
	

		
	public static Boolean checkConnect(Context context){
		ConnectivityManager cManager=(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); 
		NetworkInfo info = cManager.getActiveNetworkInfo(); 
		  if (info != null && info.isAvailable()){ 
		       //do something 
		       //������ 
			 // Toast.makeText(context, "�W�j�B����", Toast.LENGTH_LONG).show();
		      return true;
		  }else{ 
		       //do something 
		      //Toast.makeText(context, "�޷�����", Toast.LENGTH_LONG).show();
		   
		      return false;
		  	
		  } 

	}
}
